package com.company;
// 公共的父类
//企鹅类 继承自这个类
//老鼠类 继承自这个类
public class Animal {
    private String name;
    private int id;
    public Animal(String myName, int myId) {
        name = myName;
        id = myId;
    }

    public void sleep() {
        System.out.println(name + "正在睡觉");
    }

    public void eat() {
        System.out.println(name + "正在吃饭");
    }

    public void introduce() {
        System.out.println("大家好！我是" + id + "号" + name + ".");
    }
}
